package com.example.controller;

import java.lang.reflect.Method;
import java.util.Hashtable;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author ：fbb
 * @version ：1.0
 * @since 2022-02-15 10:23
 */
public class Test02 {
    public static void main(String[] args) throws NoSuchMethodException {
        // 获取类上的注解
        Class<Demo> clazz = Demo.class;
        // 获取defaultMethod方法上的注解
//        Method defaultMethod = clazz.getMethod("defaultMethod", (Class<?>[]) null);
//        jack annotation = defaultMethod.getAnnotation(jack.class);
//        System.out.println(annotation.getValue());
        jack defaultMethod1 = Demo.class.getMethod("defaultMethod").getAnnotation(jack.class);
        System.out.println(defaultMethod1.getValue());

        ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();

    }
}
